package com.zl.controller;

import com.zl.domain.HeroConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zl
 * @date 2023/3/23
 * @apiNote
 */
@RestController
public class NacosCondifController {

    @Autowired
    private HeroConfig heroConfig;

    @GetMapping("/test")
    public String test() {
        return "hore name is "+heroConfig.getName() + " age is "+heroConfig.getAge() + " address is "+heroConfig.getAddress();
    }
}
